package builders;

import force.GlobalForce;
import force.Gravity;
import java.util.LinkedList;
import main.Simulation;

/**
 * Builds a gravity object.
 * @author Paul
 * @author Lance
 */
public class GravityBuilder extends GlobalForceBuilder {
    
    @Override
    public void build(Simulation sim, LinkedList<Double> properties) {
        double angle = properties.poll();
        double magnitude = properties.poll();
        
        GlobalForce force = new Gravity(angle, magnitude);
        addForces(sim, force);
    }

}
